/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package edu.upn.sigemfi.vnf.be;

import java.io.Serializable;
import java.math.BigInteger;
import java.util.Collection;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 *
 * @author Administrador
 */
@Entity
@Table(name = "VNF_TIPO_TRANSACCION_NF")
@NamedQueries({@NamedQuery(name = "TipoTransaccionNF.findAll", query = "SELECT t FROM TipoTransaccionNF t"), @NamedQuery(name = "TipoTransaccionNF.findByIdTipotransaccionNf", query = "SELECT t FROM TipoTransaccionNF t WHERE t.idTipotransaccionNf = :idTipotransaccionNf"), @NamedQuery(name = "TipoTransaccionNF.findByDescripcion", query = "SELECT t FROM TipoTransaccionNF t WHERE t.descripcion = :descripcion")})
public class TipoTransaccionNF implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "ID_TIPOTRANSACCION_NF")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long idTipotransaccionNf;
    @Column(name = "DESCRIPCION")
    private BigInteger descripcion;
    @OneToMany(mappedBy = "fidVnfTipotransaccionNf", fetch = FetchType.LAZY)
    private Collection<TransaccionNoFinanciera> transaccionNoFinancieraCollection;

    public TipoTransaccionNF() {
    }

    public TipoTransaccionNF(Long idTipotransaccionNf) {
        this.idTipotransaccionNf = idTipotransaccionNf;
    }

    public Long getIdTipotransaccionNf() {
        return idTipotransaccionNf;
    }

    public void setIdTipotransaccionNf(Long idTipotransaccionNf) {
        this.idTipotransaccionNf = idTipotransaccionNf;
    }

    public BigInteger getDescripcion() {
        return descripcion;
    }

    public void setDescripcion(BigInteger descripcion) {
        this.descripcion = descripcion;
    }

    public Collection<TransaccionNoFinanciera> getTransaccionNoFinancieraCollection() {
        return transaccionNoFinancieraCollection;
    }

    public void setTransaccionNoFinancieraCollection(Collection<TransaccionNoFinanciera> transaccionNoFinancieraCollection) {
        this.transaccionNoFinancieraCollection = transaccionNoFinancieraCollection;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idTipotransaccionNf != null ? idTipotransaccionNf.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof TipoTransaccionNF)) {
            return false;
        }
        TipoTransaccionNF other = (TipoTransaccionNF) object;
        if ((this.idTipotransaccionNf == null && other.idTipotransaccionNf != null) || (this.idTipotransaccionNf != null && !this.idTipotransaccionNf.equals(other.idTipotransaccionNf))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "edu.upn.sigemfi.vnf.be.TipoTransaccionNF[idTipotransaccionNf=" + idTipotransaccionNf + "]";
    }

}
